Skip to content

feat(mcp): surface 'serverInfo' exposed from the MCP server#14288

Merged
aayush-kapoor merged 2 commits intomainfrom
aayush/mcp-server-info
Apr 10, 2026
Merged

feat(mcp): surface 'serverInfo' exposed from the MCP server#14288
aayush-kapoor merged 2 commits intomainfrom
aayush/mcp-server-info

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

@aayush-kapoor aayush-kapoor commented Apr 9, 2026

Background

introduced in #13825

we used to capture the serverInfo in the schema but never surface it through to the client. only result.capabilities was stored and result.serverInfo was thrown away. there was no field on the client to hold it and no property on the MCPClient interface to access it

Summary

  • added title field to ClientOrServerImplementationSchema to align with MCP spec
  • exposed serverInfo via a getter function

Manual Verification

verified by running the client and server under examples/mcp/src/server-info

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@tigent tigent bot added ai/mcp related to `@ai-sdk/mcp` package feature New feature or request labels Apr 9, 2026
@aayush-kapoor aayush-kapoor added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Apr 9, 2026
@aayush-kapoor aayush-kapoor merged commit a98bf66 into main Apr 10, 2026
21 checks passed
@aayush-kapoor aayush-kapoor deleted the aayush/mcp-server-info branch April 10, 2026 14:33
vercel-ai-sdk bot pushed a commit that referenced this pull request Apr 10, 2026
## Background

introduced in #13825 

we used to capture the `serverInfo` in the schema but never surface it
through to the client. only `result.capabilities` was stored and
`result.serverInfo` was thrown away. there was no field on the client to
hold it and no property on the MCPClient interface to access it

## Summary

- added `title` field to `ClientOrServerImplementationSchema` to align
with [MCP
spec](https://modelcontextprotocol.io/specification/2025-11-25/schema#implementation)
- exposed `serverInfo` via a getter function 

## Manual Verification

verified by running the client and server under
`examples/mcp/src/server-info`

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)
@vercel-ai-sdk vercel-ai-sdk bot removed the backport Admins only: add this label to a pull request in order to backport it to the prior version label Apr 10, 2026
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Apr 10, 2026

✅ Backport PR created: #14321

vercel-ai-sdk bot added a commit that referenced this pull request Apr 10, 2026
…#14321)

This is an automated backport of #14288 to the release-v6.0 branch. FYI
@aayush-kapoor

Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com>
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Apr 10, 2026

🚀 Published in:

Package Version
@ai-sdk/mcp 2.0.0-beta.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/mcp related to `@ai-sdk/mcp` package feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants